home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / clean / sun3.lha / Sun3 / seqdemos / twice.icl < prev    next >
Text File  |  1992-08-07  |  314b  |  21 lines

  1. MODULE twice;
  2.  
  3. <<
  4. The Twice function.
  5.  
  6. An integer (0) is incremented 65536 times using the higher
  7. order function Twice.
  8.  
  9. Set the A+B stack size to at least 2m.
  10. >>
  11.  
  12. IMPORT deltaI;
  13.  
  14. RULE
  15.  
  16. ::  Twice (=> x x) x    -> x;
  17.     Twice f x           -> f (f x);
  18.  
  19. ::  Start -> INT;
  20.     Start -> Twice Twice Twice Twice ++ 0;
  21.